[##include file="common/header.tpl.php"##]
[##include file="common/nav.tpl.php"##]
<div id="main">  
<form id="delete_form" method="post">
    <table class=gridView>
  <thead>
  <tr>
    <td>姓名</td>
    <td>性别</td>
    <td>日期</td>
    <td>手机验证</td>
    <td>删除</td>
  </tr>
  </thead>
  [##section name=list loop=$draw##]
  <tr>
    <td>[##$draw[list].name##] </td>
    <td>[##if $draw[list].sex==1##][男][##else##][女][##/if##]</td>
    <td>[##$draw[list].time|formatTime:'day'##]</td>
    <td>
    [##if $draw[list].proving==0##]未验证[##else##]已验证[##/if##]
    </td>
    <td>
    <input type="checkbox" name="checkbox[]" value="[##$draw[list].time##]"/>
    </td>
  </tr>
  [##/section##]
   <tr>
    <td colspan="5">
    [##if $draw##]
    全选
      <input type="checkbox" name="checkbox2" id="checkbox2" onClick="Checkall();" value="NO1"/>
      <input type="button" id="delete_submit" value="删除" />&nbsp;&nbsp;&nbsp;
    [##else##]
    暂无信息
    [##/if##] 
      </td>
    </tr>
</table>
</form>
    <br />
	[##$lucky_count|Pager:$per_page##]
	</p>
</div>
<script>
// 绑定表单提交事件
$('#delete_submit').click(function() {
	var submit_url = '[##$adminurl##]/?m=telephone&a=updelete';
	$.post(submit_url , $('#delete_form').serialize() , function(d) {
		if(d.code) return alert(d.msg);

		alert(d.msg);
		window.location.href = '[##$adminurl##]/?m=telephone&a=delete';
	} , 'json');

});
function Checkall(){
		var a=document.getElementsByTagName("input");
		var i;
		var k;
		if (delete_form.checkbox2.checked==true)
			{
				for (k=0;k<a.length;k++)
					{
						a[k].checked=true;	
					}		
			}
		else 
			{
				for (i=0;i<a.length;i++)
					{
						a[i].checked=false;
					}
			}
		}
</script>
[##include file="common/footer.tpl.php"##]

